<div class="page-content" >
	<div class="panel panel-default">
		<div class="panel-heading">
		<ul class="breadcrumb">
			
				<li><a  href="<{:addons_url('index',array('type'=>$type))}>">分类列表</a> </li>
				<li class="active">添加分类</li>
			</ul>
		
		</div>
		<div class="panel-body">
			  <form id="myform" method="post" class="form-horizontal" action="<{:addons_url('add_do')}>">
                    <input type="hidden" name="cate_id" value="<{$data.cate_id}>">
                     
                            <div class="form-group">
                                <label for="input-title" class="col-sm-2 control-label">选择上级</label>
                                <div class="col-sm-7">
                                   <select name="parent_id">
                                       <option value="0">顶级</option>
                                       <volist name="show_cate_data" id="vo">
<option <if condition="$cate_id eq $vo['cate_id']">selected="selected"</if> value="<{$vo['cate_id']}>"><{$vo['name']}></option>
</volist> 
                                   </select>
                                    
                                </div>
                            </div>
                     
                            <div class="form-group">
                                <label for="input-title"  class="col-sm-2 control-label">分类名</label>
                                <div class="col-sm-7">
                                    <input  type="text" class="form-control" class="vmaal_sinw1 input_a1 int_wod" id="title" name="cate_name" value="<{$data.cate_name}>">
                                    
                                </div>
                            </div>
						
                        <if condition="$type">   
						<input type="hidden" name="type" value="<{$type}>" />
						<else/>   
                            <div class="form-group">
                                <label for="input-title" class="col-sm-2 control-label">类型</label>
                                <div class="col-sm-7">
								<select name="type">
                                    <volist name="cate_type" id="vo">
								<option <if condition="$key eq $type">selected="selected"</if> value="<{$key}>"><{$vo}></option>
							</volist>   
							</select> 
                                </div>
                            </div>
							</if>
                            <div class="form-group">
                                <label for="input-title" class="col-sm-2 control-label">显示</label>
                                <div class="col-sm-7" >
               <label> <input type="radio"  name="is_show" value="1" checked="checked"  />显示&nbsp;  </label>
               <label> <input type="radio"  name="is_show" value="2" <if condition="$data['is_show'] eq 2">checked="checked" </if>  />不显示</label>
                                </div>
                            </div>
                            
                            
                            
                             <div class="form-group">
					<div class="col-sm-offset-2 col-sm-7">
						<button type="submit" class="btn btn-primary">保存</button>
					</div>
				</div>

                          
                     </form>
		</div>
	</div>
</div>

<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            cate_name: {
                message: '分类名称',
                validators: {
                    notEmpty: {
                        message: '名称不能为空'
                    },
                }
            },
			
        }
    });
	
 
});
 </script>

 